package com.example.vertification.service;

import com.example.vertification.Utils.RedisUtil;
import com.example.vertification.entity.PageEntity;
import com.example.vertification.entity.UserWithPageEntity;
import com.example.vertification.repository.PageRepository;
import com.example.vertification.repository.UserWithPageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserWithPageService {


    private final UserWithPageRepository userWithPageRepository;

    @Autowired
    public UserWithPageService(UserWithPageRepository userWithPageRepository) {
        this.userWithPageRepository = userWithPageRepository;
    }

    public UserWithPageEntity getEntityByUid(long uid) {
        return userWithPageRepository.findByUid(uid);
    }


    public UserWithPageEntity save(UserWithPageEntity e) {
        return userWithPageRepository.save(e);
    }


}